<template>
  <div class="new-song-menu-wrap">
    <div class="avater">
    
      <el-image style :src="songMenu.picUrl" fit="cover"></el-image>
      <div class="new-song-menu-counts">
          <!-- <span>▷{{songMenu.playCount}}</span> -->
          <span>▷{{playCount}}</span>
      </div>

    </div>
    <div class="song-menu-info">

        <span>{{songMenu.name}}</span>
       
    </div>
  </div>
</template>

<script lang='ts'>
import { defineComponent, computed } from "vue";
import {unitConverter} from '../../hooks/number-transform'

export default defineComponent({
  setup(props) {

    let playCount = computed(()=>unitConverter(props.songMenu.playCount))
    
    // console.log('playCount',playCount);
    
    return {
        playCount
    };
  },
  
  props: {
    //指定接收的值，必须指定类型
    songMenu: {
      type: Object,
    },
  },
});
</script>
 
<style lang = "scss" scoped>
@import "../../assets/css/home.scss";
</style>